var city = [
	{ "name": "广东省", "info": ['广州市', '深圳市', '佛山市', '珠海市'] },
	{ "name": "四川省", "info": ['成都市', '德阳市', '绵阳市', '广元市'] },
	{ "name": "云南省", "info": ['昆明市', '大理市', '丽江市'] },
	{ "name": "贵州省", "info": ['贵阳市', '遵义市'] }
];
window.onload = function () {
	for (var i in city) {
		document.getElementById("province").innerHTML += "<option>" + city[i].name + "</option>"
	}

}

function loadCity() {
	var sheng =document.getElementById("province").value;
    for(var i in city){
		if(city[i].name==sheng){
			var shi =document.getElementById("city");
			shi.options.length=1;
			for(var j in city[i].info){
				shi.innerHTML+="<option>"+city[i].info[j]+"</option>"
			}

		}
	}
}
